package my.edu.model.User.entity.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;
import my.edu.common.validate.IntegerPattern;
import my.edu.common.validate.groups.Insert;

import java.util.List;
import java.util.Map;

@Data
public class UserDTO {
    @NotNull(message = "id不能为空")
    @Min(value = 1, message = "id不能小于1")
    @Null(message = "id不能为空",groups = {Insert.class})
    private Long id;
    @NotBlank(message = "昵称不能为空",groups = {Insert.class})
    @NotBlank(message = "昵称不能为空",groups = {Insert.class})
    private String username;
    @NotBlank(message = "姓名不能为空",groups = {Insert.class})
    private String name;
    private String number;
    private String mobile;
    @IntegerPattern(regexp = "^[0-1]$", message = "状态参数错误")
    private Integer status;
    private List<Long> roleId;
}
